﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Gestion.Core.Service;

namespace Gestion.WinForms
{
    static class Program
    {
        private static Spring.Context.Support.XmlApplicationContext _applicationContext;
        public static Spring.Context.Support.XmlApplicationContext ApplicationContext
        {
            get { return _applicationContext; }
            set { _applicationContext = value; }
        }

        public static ServiceManager ServiceManager
        {
            get { return (ServiceManager)ApplicationContext["serviceManager"]; }
        }
        /// <summary>
        /// Punto de entrada principal para la aplicación.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Gestion.Config.AppConfigurator.ConfigureLog4net();
            _applicationContext = (Spring.Context.Support.XmlApplicationContext)Gestion.Config.AppConfigurator.ConfigureApplicationContext();
            Application.Run(new Form1());
        }
    }
}
